<?php
  add_action('admin_menu', 'myconfig_admins_travel_agent');
  function myconfig_admins_travel_agent()
  {   
     add_menu_page( 'Travel Agent', 'Travel Agent', 'administrator', 'travel-agent-setting', 'travel_agent_theme_setting');
  }  
  function travel_agent_theme_setting()
  {
  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<title>Order Detail</title>
	<script src="<?php bloginfo('template_url');?>/orders/js/jquery.js" type="text/javascript" ></script>
	<script src="<?php bloginfo('template_url');?>/orders/js/customJS.js" type="text/javascript" ></script>
		
	<link href="<?php bloginfo('template_url');?>/orders/css/style.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/orders.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/tabcontent.css" rel="stylesheet" type="text/css" />
	<!-- 
	<script src="<?php bloginfo('template_url');?>/admins/js/tabcontent.js" 			type="text/javascript" ></script>  
	 -->		
	</head>	
	<body>	
	<?php 
	$urls = get_bloginfo('home')."/wp-admin/admin.php?page=travel-agent-setting";
	if(isset($_GET['del'])!=null && isset($_GET['cus'])!=null)
	{
		
		$agentID = $_GET['del'];
		$cusID   = $_GET['cus'];
		db_delete_agents_by_id($agentID, $cusID);
		wp_redirect($urls);
	}
	
	?>			
			<div id="my_theme_options_content" style="width: 98%;">
                <!-- Tab choosen -->
                
		   <ul id="countrytabs" class="shadetabs">          
		       <li><a <?php echo 'class="tour-menu-active"';?> href="<?php bloginfo('home');?>/wp-admin/admin.php?page=travel-agent-setting" >Travel Agent Booked</a></li> 	 	
		           	 	
           </ul>
           <!-- End Tab choosen -->   
           <div class="box-tabs">    
           <?php 
           if(isset($_GET['agent'])!=null && isset($_GET['cus'])!=null)
           {           		
				include TEMPLATEPATH.'/orders/agents/view-detail-update-agent.php';
           }
           else 
           {
           		include TEMPLATEPATH.'/orders/agents/view-booked-agent.php';
           }
           ?>                               
            <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->	                    
	       </div>		             					             
    	</div>
    	</body>
	</html>
  <?php 	
  }
?>